home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6673 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: softsite.co.at!wsog
  2. Date: 12 Feb 1996 08:43:00 +0100
  3. From: wsog@softsite.co.at (Walter Sommergruber)
  4. Newsgroups: comp.lang.c++
  5. Message-ID: <62hjVYYrnTB@softsite.co.at>
  6. References: <4ffeqa$pjh@brtph500.bnr.ca> <4flcj7$66h@trance.isys.net>
  7. Subject: Re: How to the size of a file in C ?
  8. X-Newsreader: XP v3.02
  9. X-Charset: ISO-8859-1
  10. Organization: Sommergruber Software & Dienstleistungen
  11.  
  12. Henrik  (Henrik.Stellmann@Hamburg.NetSurf.DE) wrote on 11.02.96
  13. about "Re: How to the size of a file in C ?":
  14.  
  15. > Gilbert Banks <gilbertb@bnr.ca> wrote:
  16. > >How do I get the size of a file in C UNIX-based?  I tried sizeof <file>,
  17. > >but
  18. >
  19. > try this:
  20. [snip]
  21.  
  22. > FILE * File = fopen(FileName)
  23.  
  24. 1. fopen requires a second parameter
  25. 2. What if you don't have the right to open the file ?
  26.  
  27. There is no portable way to do this (of course there are several
  28. system dependend ways: fstat(), stat(), ....)
  29.  
  30. ---                                     Take a look at ...
  31. Walter Sommergruber                                    The Software Site
  32. email: wsog@softsite.co.at           http://www.softsite.co.at/softsite/
  33.